package roleService

import (
	roleDto "news_for_deepseek_interface/dto/admin/system/role"
	"news_for_deepseek_interface/model"
	adminModel "news_for_deepseek_interface/model/admin"
)

func Update(params roleDto.UpdateRequest) error {
	db := model.GetInstance().GetDB().Model(&adminModel.AdminGroupStruct{})

	return db.Where("id = ?", params.Id).
		Update("name", params.Name).
		Error
}
